class xT_AICommand_Cmd_Move extends xT_AICommand_Cmd;

//=============================================================================
// Variables: Movement
//=============================================================================
var protected int                         UnitsInMove;
var protected Vector                      TempDest; // for scripted move

//=============================================================================
// Events
//=============================================================================
event Popped()
{
	StopLatentExecution();
	Pawn.ZeroMovementVariables();
}

//=============================================================================
// Nav Mesh:
//=============================================================================
function bool GeneratePathToActor( Actor Goal, optional float WithinDistance, optional bool bAllowPartialPath )
{
  // Clear cache and constraints (ignore recycling for the moment)
  NavigationHandle.PathConstraintList = none;
  NavigationHandle.PathGoalList = none;

  // Create constraints
  class'NavMeshPath_Toward'.static.TowardGoal( NavigationHandle, Goal );
  class'NavMeshGoal_At'.static.AtActor( NavigationHandle, Goal, WithinDistance );

  // Find path
  return NavigationHandle.FindPath();
}

function bool GeneratePathToLocation( Vector Goal, optional float WithinDistance, optional bool bAllowPartialPath )
{
  // Clear cache and constraints (ignore recycling for the moment)
  NavigationHandle.PathConstraintList = none;
  NavigationHandle.PathGoalList = none;

  // Create constraints
  class'NavMeshPath_Toward'.static.TowardPoint( NavigationHandle, Goal );
  class'NavMeshGoal_At'.static.AtLocation( NavigationHandle, Goal, WithinDistance );

  // Find path
  return NavigationHandle.FindPath();
}

//=============================================================================
// DefaultProperties
//=============================================================================
defaultproperties
{
}
